import axios from 'axios';
import {base as request} from '@/request';
const BASE_URL = './json/';
// 获取组织机构根节点
export const GET_DEPT_ROOT = () => {
  return require(BASE_URL + 'depRoot.json');
};

/**
 * 根据部门id获取分页人员信息
 * @returns {any}
 * @constructor
 */
export const GET_PAGE_EMPLOYEE = () => {
  return require(BASE_URL + 'userData.json');
};
// 获取组织机构子节点
export const GET_DEPT_TREE = () => {
  return require(BASE_URL + 'depChild.json');
};

/**
 * 获取组织机构下人员信息
 * @returns {any}
 * @constructor
 */
export const GET_USER_BY_DEPT = () => {
  return require(BASE_URL + 'userData.json');
};

export const GET_STAFF_LIST = data => request.post('/basStaff/staffList', data);
export const GET_DEPARTMENT_TREE = data => request.post('/department/departmentList', data);
export const GET_ROLE_LIST = data => request.post('/sysRole/sysRoleList', data);
